package com.zjcloud.motr.service.impl;

import java.util.List;
import com.zjcloud.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zjcloud.motr.mapper.ZjyTimingTypeMapper;
import com.zjcloud.motr.domain.ZjyTimingType;
import com.zjcloud.motr.service.IZjyTimingTypeService;

/**
 * 计时类型维护Service业务层处理
 *
 * @author wxl
 * @date 2024-09-24
 */
@Service
public class ZjyTimingTypeServiceImpl implements IZjyTimingTypeService
{
    @Autowired
    private ZjyTimingTypeMapper zjyTimingTypeMapper;

    /**
     * 查询计时类型维护
     *
     * @param id 计时类型维护主键
     * @return 计时类型维护
     */
    @Override
    public ZjyTimingType selectZjyTimingTypeById(Long id)
    {
        return zjyTimingTypeMapper.selectZjyTimingTypeById(id);
    }

    /**
     * 查询计时类型维护列表
     *
     * @param zjyTimingType 计时类型维护
     * @return 计时类型维护
     */
    @Override
    public List<ZjyTimingType> selectZjyTimingTypeList(ZjyTimingType zjyTimingType)
    {
        return zjyTimingTypeMapper.selectZjyTimingTypeList(zjyTimingType);
    }

    /**
     * 新增计时类型维护
     *
     * @param zjyTimingType 计时类型维护
     * @return 结果
     */
    @Override
    public int insertZjyTimingType(ZjyTimingType zjyTimingType)
    {
        zjyTimingType.setCreateTime(DateUtils.getNowDate());
        return zjyTimingTypeMapper.insertZjyTimingType(zjyTimingType);
    }

    /**
     * 修改计时类型维护
     *
     * @param zjyTimingType 计时类型维护
     * @return 结果
     */
    @Override
    public int updateZjyTimingType(ZjyTimingType zjyTimingType)
    {
        zjyTimingType.setUpdateTime(DateUtils.getNowDate());
        return zjyTimingTypeMapper.updateZjyTimingType(zjyTimingType);
    }

    /**
     * 批量删除计时类型维护
     *
     * @param ids 需要删除的计时类型维护主键
     * @return 结果
     */
    @Override
    public int deleteZjyTimingTypeByIds(Long[] ids)
    {
        return zjyTimingTypeMapper.deleteZjyTimingTypeByIds(ids);
    }

    /**
     * 删除计时类型维护信息
     *
     * @param id 计时类型维护主键
     * @return 结果
     */
    @Override
    public int deleteZjyTimingTypeById(Long id)
    {
        return zjyTimingTypeMapper.deleteZjyTimingTypeById(id);
    }
}
